<template>
  <div class="home-container">
    <!-- 英雄区域 -->
    <section class="hero-section">
      <div class="hero-content">
        <h1 class="hero-title">EchoRealm</h1>
        <p class="hero-subtitle">沉浸式TRPG在线平台</p>
        <p class="hero-description">
          体验最真实的桌面角色扮演游戏，支持经典模式和现代TRPG模式，
          内置地图编辑器、角色卡系统、骰娘助手等完整功能。
        </p>
        <div class="hero-actions">
          <el-button type="primary" size="large" @click="$router.push('/classic')">
            开始游戏
          </el-button>
          <el-button size="large" @click="$router.push('/editor')">
            创建模组
          </el-button>
        </div>
      </div>
      <div class="hero-image">
        <div class="feature-cards">
          <div class="feature-card">
            <el-icon class="feature-icon"><MapLocation /></el-icon>
            <h3>地图系统</h3>
            <p>支持迷雾、标记、区域编辑</p>
          </div>
          <div class="feature-card">
            <el-icon class="feature-icon"><User /></el-icon>
            <h3>角色卡</h3>
            <p>COC7版完整角色卡系统</p>
          </div>
          <div class="feature-card">
            <el-icon class="feature-icon"><Dice /></el-icon>
            <h3>骰娘助手</h3>
            <p>智能骰子指令解析</p>
          </div>
        </div>
      </div>
    </section>

    <!-- 功能特色 -->
    <section class="features-section">
      <div class="container">
        <h2 class="section-title">平台特色</h2>
        <div class="features-grid">
          <div class="feature-item">
            <el-icon class="feature-icon"><Monitor /></el-icon>
            <h3>多端适配</h3>
            <p>支持PC端和移动端，响应式设计确保最佳体验</p>
          </div>
          <div class="feature-item">
            <el-icon class="feature-icon"><Connection /></el-icon>
            <h3>实时同步</h3>
            <p>WebSocket技术实现游戏状态实时同步</p>
          </div>
          <div class="feature-item">
            <el-icon class="feature-icon"><Edit /></el-icon>
            <h3>模组编辑器</h3>
            <p>可视化模组创建工具，支持自定义剧情</p>
          </div>
          <div class="feature-item">
            <el-icon class="feature-icon"><Lock /></el-icon>
            <h3>安全可靠</h3>
            <p>JWT身份验证，数据加密存储</p>
          </div>
        </div>
      </div>
    </section>

    <!-- 快速开始 -->
    <section class="quick-start-section">
      <div class="container">
        <h2 class="section-title">快速开始</h2>
        <div class="steps">
          <div class="step">
            <div class="step-number">1</div>
            <h3>注册账号</h3>
            <p>创建您的EchoRealm账号</p>
          </div>
          <div class="step">
            <div class="step-number">2</div>
            <h3>创建角色</h3>
            <p>使用COC7规则创建角色卡</p>
          </div>
          <div class="step">
            <div class="step-number">3</div>
            <h3>开始游戏</h3>
            <p>加入房间或创建自己的游戏</p>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script setup>
// 页面逻辑
</script>

<style scoped>
.home-container {
  min-height: 100vh;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 20px;
  display: flex;
  align-items: center;
  min-height: 600px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  margin-right: 40px;
}

.hero-title {
  font-size: 48px;
  font-weight: bold;
  margin: 0 0 16px 0;
  background: linear-gradient(45deg, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 24px;
  margin: 0 0 20px 0;
  opacity: 0.9;
}

.hero-description {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 32px 0;
  opacity: 0.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 400px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
  color: #e0e7ff;
}

.feature-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}

.features-section {
  padding: 80px 20px;
  background: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 36px;
  margin: 0 0 60px 0;
  color: #333;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.feature-item {
  text-align: center;
  padding: 32px 20px;
}

.feature-item .feature-icon {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 20px;
}

.feature-item h3 {
  font-size: 20px;
  margin: 0 0 12px 0;
  color: #333;
}

.feature-item p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.quick-start-section {
  padding: 80px 20px;
  background: #f8fafc;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 20px;
  margin: 0 0 12px 0;
  color: #333;
}

.step p {
  color: #666;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
  }
  
  .hero-content {
    margin-right: 0;
    margin-bottom: 40px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .feature-cards {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  
  .hero-actions {
    justify-content: center;
  }
}
</style>
